﻿using System;
using System.Collections.Generic;
using System.Data.Entity;
using System.Linq;
using System.Text;

namespace DataAccess
{
    public class DatabaseInitializer : IDatabaseInitializer<CompanyDicContainer>
    {

        public void InitializeDatabase(CompanyDicContainer context)
        {
            var k1 = new Kind() { Name = "外资" };
            var k2 = new Kind() { Name = "合资" };
            var k3 = new Kind() { Name = "国企" };
            var k4 = new Kind() { Name = "民营" };
            var k5 = new Kind() { Name = "外企代表处" };
            var k6 = new Kind() { Name = "政府机关" };
            var k7 = new Kind() { Name = "事业单位" };
            var k8 = new Kind() { Name = "非营利机构" };
            var k9 = new Kind() { Name = "其他性质" };

            context.KindSet.Add(k1);
            context.KindSet.Add(k2);
            context.KindSet.Add(k3);
            context.KindSet.Add(k4);
            context.KindSet.Add(k5);
            context.KindSet.Add(k6);
            context.KindSet.Add(k7);
            context.KindSet.Add(k8);
            context.KindSet.Add(k9);

            context.SaveChanges();


            var s1 = new Size() { Name = "1-49人" };
            var s2 = new Size() { Name = "50-99人" };
            var s3 = new Size() { Name = "100-499人" };
            var s4 = new Size() { Name = "500-999人" };
            var s5 = new Size() { Name = "1000人以上" };

            context.SizeSet.Add(s1);
            context.SizeSet.Add(s2);
            context.SizeSet.Add(s3);
            context.SizeSet.Add(s4);
            context.SizeSet.Add(s5);

            context.SaveChanges();


            var i1 = new Industry() { Name = "计算机/互联网/通信/电子", Code = "01" };
            var i2 = new Industry() { Name = "计算机软件", Code = "0101" };
            var i3 = new Industry() { Name = "计算机硬件", Code = "0102" };
            var i4 = new Industry() { Name = "计算机服务(系统、数据服务、维修)", Code = "0103" };
            var i5 = new Industry() { Name = "通信/电信/网络设备", Code = "0104" };
            var i6 = new Industry() { Name = "通信/电信运营、增值服务", Code = "0105" };
            var i7 = new Industry() { Name = "互联网/电子商务", Code = "0106" };
            var i8 = new Industry() { Name = "网络游戏", Code = "0107" };
            var i9 = new Industry() { Name = "电子技术/半导体/集成电路", Code = "0108" };
            var i10 = new Industry() { Name = "仪器仪表/工业自动化", Code = "0109" };
            var i11 = new Industry() { Name = "会计/金融/银行/保险", Code = "02" };
            var i12 = new Industry() { Name = "会计/审计", Code = "0201" };
            var i13 = new Industry() { Name = "金融/投资/证券", Code = "0202" };
            var i14 = new Industry() { Name = "银行", Code = "0203" };
            var i15 = new Industry() { Name = "保险", Code = "0204" };
            var i16 = new Industry() { Name = "贸易/消费/制造/营运", Code = "03" };
            var i17 = new Industry() { Name = "贸易/进出口", Code = "0301" };
            var i18 = new Industry() { Name = "批发/零售", Code = "0302" };
            var i19 = new Industry() { Name = "快速消费品(食品、饮料、化妆品)", Code = "0303" };
            var i20 = new Industry() { Name = "服装/纺织/皮革", Code = "0304" };
            var i21 = new Industry() { Name = "家具/家电/工艺品/玩具/珠宝", Code = "0305" };
            var i22 = new Industry() { Name = "奢侈品/收藏品", Code = "0306" };
            var i23 = new Industry() { Name = "办公用品及设备", Code = "0307" };
            var i24 = new Industry() { Name = "机械/设备/重工", Code = "0308" };
            var i25 = new Industry() { Name = "汽车及零配件", Code = "0309" };
            var i26 = new Industry() { Name = "制药/医疗", Code = "04" };
            var i27 = new Industry() { Name = "制药/生物工程", Code = "0401" };
            var i28 = new Industry() { Name = "医疗/护理/卫生", Code = "0402" };
            var i29 = new Industry() { Name = "医疗设备/器械", Code = "0403" };
            var i30 = new Industry() { Name = "广告/媒体", Code = "05" };
            var i31 = new Industry() { Name = "广告", Code = "0501" };
            var i32 = new Industry() { Name = "公关/市场推广/会展", Code = "0502" };
            var i33 = new Industry() { Name = "影视/媒体/艺术/文化传播", Code = "0503" };
            var i34 = new Industry() { Name = "文字媒体/出版", Code = "0504" };
            var i35 = new Industry() { Name = "印刷/包装/造纸", Code = "0505" };
            var i36 = new Industry() { Name = "房地产/建筑", Code = "06" };
            var i37 = new Industry() { Name = "房地产开发", Code = "0601" };
            var i38 = new Industry() { Name = "建筑/建材/工程", Code = "0602" };
            var i39 = new Industry() { Name = "家居/室内设计/装潢", Code = "0603" };
            var i40 = new Industry() { Name = "物业管理/商业中心", Code = "0604" };
            var i41 = new Industry() { Name = "专业服务/教育/培训", Code = "07" };
            var i42 = new Industry() { Name = "中介服务", Code = "0701" };
            var i43 = new Industry() { Name = "专业服务(咨询、人力资源、财会)", Code = "0702" };
            var i44 = new Industry() { Name = "外包服务", Code = "0703" };
            var i45 = new Industry() { Name = "检测，认证", Code = "0704" };
            var i46 = new Industry() { Name = "法律", Code = "0705" };
            var i47 = new Industry() { Name = "教育/培训/院校", Code = "0706" };
            var i48 = new Industry() { Name = "学术/科研", Code = "0707" };
            var i49 = new Industry() { Name = "服务业", Code = "08" };
            var i50 = new Industry() { Name = "餐饮业", Code = "0801" };
            var i51 = new Industry() { Name = "酒店/旅游", Code = "0802" };
            var i52 = new Industry() { Name = "娱乐/休闲/体育", Code = "0803" };
            var i53 = new Industry() { Name = "美容/保健", Code = "0804" };
            var i54 = new Industry() { Name = "生活服务", Code = "0805" };
            var i55 = new Industry() { Name = "物流/运输", Code = "09" };
            var i56 = new Industry() { Name = "交通/运输/物流", Code = "0901" };
            var i57 = new Industry() { Name = "航天/航空", Code = "0902" };
            var i58 = new Industry() { Name = "能源/原材料", Code = "10" };
            var i59 = new Industry() { Name = "石油/化工/矿产/地质", Code = "1001" };
            var i60 = new Industry() { Name = "采掘业/冶炼", Code = "1002" };
            var i61 = new Industry() { Name = "电力/水利", Code = "1003" };
            var i62 = new Industry() { Name = "新能源", Code = "1004" };
            var i63 = new Industry() { Name = "原材料和加工", Code = "1005" };
            var i64 = new Industry() { Name = "政府/非赢利机构/其他", Code = "11" };
            var i65 = new Industry() { Name = "政府/公共事业", Code = "1101" };
            var i66 = new Industry() { Name = "非盈利机构", Code = "1102" };
            var i67 = new Industry() { Name = "环保", Code = "1103" };
            var i68 = new Industry() { Name = "农/林/牧/渔", Code = "1104" };
            var i69 = new Industry() { Name = "多元化业务集团公司", Code = "1105" };
            var i70 = new Industry() { Name = "其他行业", Code = "1106" };

            context.IndustrySet.Add(i1);
            context.IndustrySet.Add(i2);
            context.IndustrySet.Add(i3);
            context.IndustrySet.Add(i4);
            context.IndustrySet.Add(i5);
            context.IndustrySet.Add(i6);
            context.IndustrySet.Add(i7);
            context.IndustrySet.Add(i8);
            context.IndustrySet.Add(i9);
            context.IndustrySet.Add(i10);
            context.IndustrySet.Add(i11);
            context.IndustrySet.Add(i12);
            context.IndustrySet.Add(i13);
            context.IndustrySet.Add(i14);
            context.IndustrySet.Add(i15);
            context.IndustrySet.Add(i16);
            context.IndustrySet.Add(i17);
            context.IndustrySet.Add(i18);
            context.IndustrySet.Add(i19);
            context.IndustrySet.Add(i20);
            context.IndustrySet.Add(i21);
            context.IndustrySet.Add(i22);
            context.IndustrySet.Add(i23);
            context.IndustrySet.Add(i24);
            context.IndustrySet.Add(i25);
            context.IndustrySet.Add(i26);
            context.IndustrySet.Add(i27);
            context.IndustrySet.Add(i28);
            context.IndustrySet.Add(i29);
            context.IndustrySet.Add(i30);
            context.IndustrySet.Add(i31);
            context.IndustrySet.Add(i32);
            context.IndustrySet.Add(i33);
            context.IndustrySet.Add(i34);
            context.IndustrySet.Add(i35);
            context.IndustrySet.Add(i36);
            context.IndustrySet.Add(i37);
            context.IndustrySet.Add(i38);
            context.IndustrySet.Add(i39);
            context.IndustrySet.Add(i40);
            context.IndustrySet.Add(i41);
            context.IndustrySet.Add(i42);
            context.IndustrySet.Add(i43);
            context.IndustrySet.Add(i44);
            context.IndustrySet.Add(i45);
            context.IndustrySet.Add(i46);
            context.IndustrySet.Add(i47);
            context.IndustrySet.Add(i48);
            context.IndustrySet.Add(i49);
            context.IndustrySet.Add(i50);
            context.IndustrySet.Add(i51);
            context.IndustrySet.Add(i52);
            context.IndustrySet.Add(i53);
            context.IndustrySet.Add(i54);
            context.IndustrySet.Add(i55);
            context.IndustrySet.Add(i56);
            context.IndustrySet.Add(i57);
            context.IndustrySet.Add(i58);
            context.IndustrySet.Add(i59);
            context.IndustrySet.Add(i60);
            context.IndustrySet.Add(i61);
            context.IndustrySet.Add(i62);
            context.IndustrySet.Add(i63);
            context.IndustrySet.Add(i64);
            context.IndustrySet.Add(i65);
            context.IndustrySet.Add(i66);
            context.IndustrySet.Add(i67);
            context.IndustrySet.Add(i68);
            context.IndustrySet.Add(i69);
            context.IndustrySet.Add(i70);

            context.SaveChanges();




            context.SaveChanges();

        }
    }
}
